knowledge: an unattended worker's in-band question reaches nobody (1 ingested, 2 dropped as in-flight dups of #47/#51) - #64
Open
choiyounggi wants to merge 1 commit into
Conversation
New: infrastructure/agent-orchestration/unattended-worker-questions — an unattended worker's in-band question reaches nobody: with a TTY the chooser waits indefinitely while liveness checks pass, without one it self-answers empty. Classify a live-terminal stall from the terminal tail before restarting, unblock with an allowlisted key sequence, re-send the prompt the chooser swallowed, and prevent recurrence with a durable out-of-band question record. Dropped: the worktree_escape read-only-escalation candidate (in flight in #47 and #51) and the Orca dispatch-binding taxonomy candidate (in flight in #51/#47). log.md records a contradiction between #47 and #51 on the guardrail mechanism, settled against the rule source in favour of #51.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Knowledge flush — 3 insight(s): 1 ingested, 2 dropped as in-flight duplicates
Queue drained:
~/.dev-loop/queue/f1a3ae46-….jsonl(3 pending rows). One new page,no existing page rewritten, one contradiction between two open PRs flagged in
log.md.Verified best-practice
A — ingested: a worker agent's in-band question reaches nobody
Claim. When an agent worker runs unattended and raises a question through its own
interactive question UI, no answer arrives. With a TTY (a tmux pane) the chooser waits
indefinitely while every liveness check passes; without a TTY the tool self-resolves with
empty answers and the agent proceeds as if answered. The channel a worker uses to ask its
coordinator for a decision therefore has to be out-of-band and durable.
Sources checked and what each supports.
AskUserQuestion"auto-resolves immediately with empty answers", ~37 ms, before acan_use_toolcallback orPreToolUsehook can intervene; agent receivesUser has answered your questions: .Environment:claude-agent-sdk0.1.63, bundled CLI 2.1.114, Docker. Closed as not planned — the behaviour is not being changed, which is what makes the workaround durable knowledgebug,has reprosend-keyswrites key events into a pane; named keys go without-l(with it tmux sends the literal characters)skills/orchestrate/scripts/(read in this checkout)orca-worker-stalled.shheader records the measurement: three workers held a live PTY on an interactive prompt for 75 minutes with byte-identical diffs while every alive/dead check passed, andlastOutputAtwas "measured and rejected" because a TUI repaints its spinner.ask-coordinator.shis the durable channel (atomicquestions/<task>.json, refuses task names with/,.,..);watch-status.shsurfaces it as its own exit code;send-prompt.sh keysvalidates every key against the allowlistUp Down Left Right Enter Escape Tab Space 0-9 y nbefore sending any, onesend-keysper key.SKILL.mdsupplies the "at 600 s and 900 s both workers proceeded on a conservative assumption" measurementlo-4-qag1)Confidence:
verified. Two published issues with reproductions cover the no-TTY branch;the TTY branch and the remedy are backed by shipped code plus its own recorded measurements.
The one part resting on this session alone — that answering the chooser leaves a previously
queued prompt unsubmitted — is written as a single
Do thisstep and attributed to the fieldobservation in
Sources, not asserted as doc-backed.B — dropped:
worktree_escapeescalating on read-only cross-worktree accessNot ingested, and the candidate's framing is wrong. It claimed the rule "fires
askeven onread-only access". Read against the rule source (
plugins/guardrails/hooks/bash-guard.sh,worktree_escape, groundwork checkout): after stripping the worker's own worktree path and anyconfigured
allowPaths, a surviving$main_root/mention fires only if a write verb(
rm|mv|cp|tee|mkdir|touch|install|dd) or a redirect to an absolute path also matches — and thetwo tests are matched independently over the whole command string. A bare
grep/awk/git statusread does not fire; a read sharing a command line with any write verb does. That is exactly what
open PR #51 already documents, so the candidate adds nothing and would re-introduce a wrong mechanism.
C — dropped: Orca dispatch-binding failure taxonomy
Not ingested. The candidate's content (check for the idle prompt before binding;
runtime_unavailable= the turn's tail still occupies the terminal, wait and bind a new unit;
agent_unconfigured= theagent process is dead, close the terminal and create a new worker-mode agent; always pass the worktree
with the terminal) is carried by open PRs #51 and #47 in equal or better form, with the same field
evidence. Verified only far enough to confirm the overlap.
Existing-layer check
Routed via
INDEX.md→infrastructure(its route line already names multi-agent orchestration:worker liveness signals, shared run state, tmux pane delivery, completion gates, worktree-isolated
workers) →
wiki/infrastructure/index.md→ theagent-orchestrationcategory. Every page in thatcategory whose "load when" line could overlap was opened in full, plus the one cross-domain page the
no-TTY branch touches.
Pages read: infrastructure-agent-orchestration-worktree-isolated-workers, infrastructure-agent-orchestration-pane-delivery-confirmation, infrastructure-agent-orchestration-control-signals-vs-primary-artifacts, infrastructure-agent-orchestration-shared-run-state, platforms-processes-non-interactive-cli-invocation
…-pane-delivery-confirmation…-control-signals-vs-primary-artifacts…-shared-run-statestatus,briefs,escalations) and run-id namespacingquestions/record is a sibling of those. The new page defers path layout to it rather than restating; linked both ways…-worktree-isolated-workersplatforms-processes-non-interactive-cli-invocationrelated:link added from the new pageMerge-before-create judgement. No existing page carries the trigger "a worker asked a question
and nobody is there". The three adjacent pages each own one slice (delivery, liveness verdict, state
layout) and splitting this insight across all three would violate one-case-per-page in each of them.
New page created, all three linked bidirectionally.
Conflicts flagged. One, and it is between two open PRs, not with merged content: #47's
worktree-isolated-workersrow says the guardrail's read/write asymmetry is version-dependent andthat "a conservative rule treats any cross-worktree path reference … reads included"; #51's row says
reads still pass alone and fire only alongside a write verb or absolute redirect. Reading the rule
source settles it in #51's favour (see "B — dropped" above). Recorded in
log.mdas acontradictionentry for resolution at merge time; nothing overwritten here.Links added.
related:now bidirectional between the new page and…-pane-delivery-confirmation,…-control-signals-vs-primary-artifacts,…-shared-run-state; one-way to…-session-completion-gatesandplatforms-processes-non-interactive-cli-invocation.Open-PR check
gh pr listis unusable here (the ambientghtoken returns HTTP 401 on the GraphQL API), so openPRs were listed through the GitHub MCP REST endpoint and every knowledge head was fetched and diffed
locally:
git fetch origin <head>thengit diff origin/main FETCH_HEAD -- wiki/.Open
knowledge/*heads at flush time (11): #62, #61, #58, #57, #56, #55, #52, #51, #50, #49, #47.(#63 is
feat/role-model-selection, not a knowledge PR.)wiki/diff was grepped formenu/interactive/send-keys/prompt-capable; the only hits arerelated:id lists and an unrelated job-control row in #57worktree_escapeon read-only accessworktree-isolated-workersedge row + a field-evidence source line with the same Wave-2awk/grep/git statusevidence) and #51 (same page, mechanism-accurate rows plus a local reproduction)log.mdrather than pushed into either branchpane-delivery-confirmation: four new edge rows — bind only at the idle prompt,runtime_unavailable→ wait and bind a fresh unit,agent_unconfigured→ replace the agent, pass the worktree with the terminal — plus anInstead ofrow) and #47 (control-signals: the done-signal-is-not-release-time row)No sibling duplicate PR was opened, and nothing was pushed to another contributor's branch.
Routing decision
infrastructure/agent-orchestration/ new pageunattended-worker-questions.md(idinfrastructure-agent-orchestration-unattended-worker-questions)agent-orchestrationalready exists and its scope line inINDEX.mdcovers worker liveness signals and tmux pane delivery. This is a sixth page in itapplies_to: [tmux, general]— the detect/unblock half is multiplexer-specific, thechannel-design half is not. Domain index gained a "load when" row for the new page;
log.mdgained one
ingestentry and onecontradictionentry.Files changed:
wiki/infrastructure/agent-orchestration/unattended-worker-questions.md(new, 76 bodylines),
wiki/infrastructure/index.md, threerelated:back-links,log.md.